package cn.aishua.data;

import android.os.Parcel;
import android.os.Parcelable;

public class CreditInfo
    implements Parcelable
{

    public static final Creator<CreditInfo> CREATOR = new Creator<CreditInfo>()
    {

        public CreditInfo createFromParcel( Parcel src )
        {
            return new CreditInfo( src.readString(), src.readInt(), src.readLong() );
        }

        public CreditInfo[] newArray( int size )
        {
            return new CreditInfo[size];
        }
    };

    private String vendor;
    private int amount;
    private long credit;

    public CreditInfo()
    {
    }

    public CreditInfo(String vendor, int amount, long credit)
    {
        this.vendor = vendor;
        this.amount = amount;
        this.credit = credit;
    }

    public int describeContents()
    {
        return 0;
    }

    public void writeToParcel( Parcel dest, int flags )
    {
        dest.writeString( vendor );
        dest.writeInt( amount );
        dest.writeLong( credit );
    }

    public String getVendor()
    {
        return vendor;
    }

    public void setVendor( String vendor )
    {
        this.vendor = vendor;
    }

    public int getAmount()
    {
        return amount;
    }

    public void setAmount( int amount )
    {
        this.amount = amount;
    }

    public long getCredit()
    {
        return credit;
    }

    public void setCredit( long credit )
    {
        this.credit = credit;
    }

}
